package com.cxc.singleton;

/**
 * author cxc
 * 静态内部类-单例模式
 */
public class StaticInnerSingleton {

    private static class SingletonClassInstance{
        private static final StaticInnerSingleton instance = new StaticInnerSingleton();
    }

    private StaticInnerSingleton(){
//        System.out.println("filename"+);
    }

    //方法没有同步，调用效率高
    public static StaticInnerSingleton getInstance(){
        return SingletonClassInstance.instance;
    }

}
